<template>
  <el-container ref="container">
    <el-header style="height:auto">
      <!-- 按钮集合 -->
      <buttonGroup :buttonGroups="buttonGroups" />
    </el-header>

    <el-main>
      <tableView :viewData="viewData"
                      :columnConfigs="columnConfigs"
                      v-model="selectData"></tableView>
    </el-main>

  </el-container>
</template>

<script>
    import buttonGroup from '@/components/button/group'
    import tableView from '@/components/table/view'
    export default {
        components: {
            'buttonGroup': buttonGroup,
            'tableView': tableView,
        },
        data() {
            return {
                buttonGroups: [{
                    icon: "el-icon-plus",
                    text: "添 加",
                    type: 'primary',
                    _click: () => {
                        console.log(111)
                    }
                }, {
                    icon: "el-icon-search",
                    text: "搜 索",
                    type: 'primary',
                    _click: () => {}
                }],
                searchForm: {
                    type: "",
                    UnifiedExaminPredictName: "",
                    region: ""
                },
                selectData: [],

                viewData: [{
                    id: '12987122',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333'
                }, {
                    id: '12987123',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333'
                }, {
                    id: '12987125',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333'
                }, {
                    id: '12987126',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333'
                }],

                columnConfigs: [{
                    prop: 'id',
                    label: '商品Id',
                    component: 'expand',
                    expandform: [{
                        label: '商品Id',
                        prop: 'id'
                    }, {
                        label: '商品名称',
                        prop: 'name'
                    }, {
                        label: '所属店铺',
                        prop: 'shop'
                    }, {
                        label: '店铺 ID',
                        prop: 'shopId'
                    }, {
                        label: '商品分类',
                        prop: 'category'
                    }, {
                        label: '店铺地址',
                        prop: 'address'
                    }, {
                        label: '商品描述',
                        prop: 'desc'
                    }]
                }, {
                    prop: 'name',
                    label: '商品名称',
                }, {
                    prop: 'desc',
                    label: '描述',
                }],

            }
        },
        created() {},
        mounthed() {},
        methods: {},
        watch: {}

    }
</script>